package wei.xinya.core.edu;

public class Varargs {
	public static void main(String[] args) {
		printMax(12,25,32.1,8,76);
	}
	public static void printMax(double... numbers){
		if(numbers.length == 0){
			System.out.println("No args");
		}
		double max = numbers[0];
		for (int i = 0; i < numbers.length; i++) {
			if (numbers[i] > max) {
				max = numbers[i];
			}			
		}
		System.out.println("The max value is " + max);
	}
}
